import React, { Component } from 'react';
import MessageItem from './MessageItem';

class MessageBox extends Component {
    render() { 
        return (this.props.messageList.map((item, key) => {
            return <MessageItem {...item} key = {key}></MessageItem>
        }));
    }
}
 
export default MessageBox;